@extends('admin.layout-user')

<?php $menu = 'user-manage'; ?>

@section('body')
    <div class="page-header">
        <h4>用户管理</h4>
    </div>

    <div class="well well-sm">
        <form class="form-inline" novalidate="" id="user" data-url="{{ '' }}" >

        <div class="form-group">
            <label class="control-label">关键词：</label>
            <select class="form-control input-sm" id="userKeyword" name="userKeyword">
            {{ '' }}
            </select>
            
            <input type="text" class="form-control input-sm" id="keyword" name="keyword" value="{{ '' }}" disabled="true">
        </div>

        <button class="btn btn-primary btn-sm" id="search" >搜索</button>
        </form>
    </div>

    <p class="text-muted">
    <span class="mrl">用户数：<strong class="inflow-num">{{ $count }}</strong></span>
    </p>

    <table id="client-table" class="table table-striped table-hover" data-search-form="#client-search-form">
    <thead>
        <tr>
        <th>编号</th>
        <th>用户名</th>
        <th>角色</th>
        <th>手机号</th>
        <th>邮箱</th>
        <th width="100">操作</th>
        </tr>
    </thead>
        <tbody>
        @foreach ($users as $user)
        <tr id="user-table-tr-{{ $user->id }}">
            <td>{{ $user->id }}</td>
            <td>
                <strong class="text-muted">{{ $user->name }}</strong>
            </td>
            <td>
                <strong class="text-muted">{{ $user->role }}</strong>
            </td>
            <td>
                <strong class="text-muted">{{ $user->phone }}</strong>
            </td>
            <td>
                <strong class="text-muted">{{ $user->email }}</strong>
            </td>
            
            <td>
                <div class="btn-group">
                <button class="btn btn-default btn-sm" data-target="#modal" data-url="{{ '' }}" data-toggle="modal">详情</button>
                <a href="#" type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
                    <span class="caret"></span>
                </a>
                <ul class="dropdown-menu pull-right">
                    <li><a href="#modal" data-url="{{ '' }}" data-toggle="modal">编辑信息</a></li>
                    <li><a href="#modal" data-url="{{ '' }}" data-toggle="modal">修改密码</a></li>
                </ul>
                </div>
            </td>
            </tr>
            @endforeach
        </tbody>
    </table>

    <div align="center">
        {{ $users->links() }}
    </div>
    
@endsection
